var CLTest = {
	car: null,
	canv: null,

	road_stripe: function() {
		var stripe = new Rectangle(0, 580, 50, 10, CLTest.canv, 0, '#FFF');
		stripe.translate_to(810, 580, 1250);
	}
};
$(document).ready(function() {
	CLTest.canv = new LCanvas(1, 800, 600, document.body);

	//create checkered background
	for (var i = 0; i < 80; i++) {
		for (var j = 0; j < 60; j++) {
			new Rectangle(i * 10, j * 10, 10, 10, CLTest.canv, 0, (i + j) % 2 == 0 ? '#B2EEFF' : '#DBF7FF');
		}
	}

	new Rectangle(0, 550, 800, 50, CLTest.canv, 0, '#333');
	new Rectangle(300, 440, 200, 120, CLTest.canv, 0, '#000');
	new Rectangle(250, 490, 50, 70, CLTest.canv, 0, '#000');
	new Rectangle(500, 490, 50, 70, CLTest.canv, 0, '#000');
	new Circle(310, 550, 25, CLTest.canv, 0, '#000');
	new Circle(490, 550, 25, CLTest.canv, 0, '#000');

	window.setInterval(CLTest.road_stripe, 400);
});
